package ch03;
import java.util.Scanner;
import java.text.DecimalFormat;
/**
 * Created by hasee on 2017/6/15.
 */
public class CircleStats {
    public static void main(String[] args) {
        int radius;
        double area,circumference;

        Scanner scan = new Scanner(System.in);
        System.out.print("Enter the circle's radius:");
        radius = scan.nextInt();

        area = Math.PI*Math.pow(radius,2);
        circumference = 2*Math.PI*radius;

        DecimalFormat fmt = new DecimalFormat("0.###");

        System.out.println("The circle's area:"+fmt.format(area));
        System.out.println("The circle's circumference:"+fmt.format(circumference));


    }
}
